import request from '@/utils/request'

// 查询库存查询列表
export function listWarehouseInventory(query) {
  return request({
    url: '/storage/warehouseInventory/list',
    method: 'get',
    params: query
  })
}

// 查询库存查询详细
export function getWarehouseInventory(batchId) {
  return request({
    url: '/storage/warehouseInventory/' + batchId,
    method: 'get'
  })
}

// 新增库存查询
export function addWarehouseInventory(data) {
  return request({
    url: '/storage/warehouseInventory',
    method: 'post',
    data: data
  })
}

// 修改库存查询
export function updateWarehouseInventory(data) {
  return request({
    url: '/storage/warehouseInventory',
    method: 'put',
    data: data
  })
}

// 删除库存查询
export function delWarehouseInventory(batchId) {
  return request({
    url: '/storage/warehouseInventory/' + batchId,
    method: 'delete'
  })
}

// 查询库存查询详细按钮
export function getWarehouseInventoryDetail(batchId) {
  return request({
    url: `/storage/entryRecord/${batchId}`,
    method: "get"
  });
}

// 入库修改库区库位
export function updateWarehouseInventoryDetail(data) {
  return request({
    url: '/storage/processRecord/updateEntryDetail',
    method: 'put',
    data: data
  })
}
